<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_log', function (Blueprint $table) {
            $table->increments('id')->comment('主键ID');
            $table->string('username', 50)->comment('账号名称');
            $table->tinyInteger('type')->comment('类型');
            $table->string('content')->comment('操作内容');
            $table->integer('addtime')->comment('操作时间');
            $table->string('IP',50)->comment('访问IP');
            $table->string('filed1')->nullable();
            $table->string('filed2')->nullable();
            $table->string('filed3')->nullable();
            $table->timestamps();
        });
         Schema::create('home_log', function (Blueprint $table) {
            $table->increments('id')->comment('主键ID');
            $table->string('username', 50)->comment('账号名称');
            $table->tinyInteger('type')->comment('类型');
            $table->string('content')->comment('操作内容');
            $table->integer('addtime')->comment('操作时间');
            $table->string('IP',50)->comment('访问IP');
            $table->string('filed1')->nullable();
            $table->string('filed2')->nullable();
            $table->string('filed3')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_log');
        Schema::dropIfExists('home_log');
    }
}
